from django.db import models


class ProductModel(models.Model):
    product_code = models.CharField(max_length=255, verbose_name='产品编码',
                                    error_messages={'Please enter a product code': '请输入产品编码'})
    platform_code = models.CharField(max_length=255, verbose_name='平台编码')
    origin_id = models.CharField(max_length=255, verbose_name='原厂ID')
    category = models.CharField(max_length=500, verbose_name='分类路径')
    category_name = models.CharField(max_length=500, verbose_name='分类名')
    manufacturer = models.CharField(max_length=255, verbose_name='制造商')
    description = models.CharField(max_length=500, verbose_name='说明')
    create_datetime = models.DateTimeField(verbose_name="添加时间")
    update_datetime = models.DateTimeField(verbose_name="更新时间")

    class Meta:
        db_table = 'product'
        verbose_name = '产品信息'
        verbose_name_plural = verbose_name
